home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1999 / MacHack 1999.toast / The Hacks / MACtive Desktop / Source / Sources / QDClipContext.cc < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-30  |  353 b   |  32 lines  |  [TEXT/CWIE]

  1. #include "QDContext.h"
  2. #include "QDClipContext.h"
  3.  
  4.  
  5.  
  6.  
  7.  
  8. QDClipContext::QDClipContext(GrafPtr port,RgnHandle clip)
  9. {
  10.     QDContext    context(port);
  11.     
  12.     
  13.     fSavePort = port;
  14.     fSaveClip = NewRgn();
  15.     
  16.     GetClip(fSaveClip);
  17.     SetClip(clip);
  18. }
  19.  
  20.  
  21.  
  22.  
  23.  
  24. QDClipContext::~QDClipContext(void)
  25. {
  26.     QDContext    context(fSavePort);
  27.     
  28.     
  29.     SetClip(fSaveClip);
  30.     DisposeRgn(fSaveClip);
  31. }
  32.